package com.gxuwz.prrs.receiver;

import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import com.gxuwz.prrs.R;
import com.gxuwz.prrs.utils.NotificationHelper;

/**
 * @author 张钧
 * @Description
 * @create 2023-05-28 下午 05:28
 */
public class AlarmReceiver extends BroadcastReceiver {
	@Override
	public void onReceive(Context context, Intent intent) {
		NotificationHelper.sendNotification(context, "签到通知", "本次练习距离开始还有10分钟，可以签到了",
				"checkin", "签到通知渠道", 2, NotificationManager.IMPORTANCE_HIGH, R.drawable.piano);
		SharedPreferences sharedPreferences = context.getSharedPreferences("appointment", Context.MODE_PRIVATE);
		SharedPreferences.Editor editor = sharedPreferences.edit();
		editor.putBoolean("setTask", false);
		editor.apply();
	}
}
